<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

<footer class="footer">
	<div class="footer-inner">
		<?php if (!empty($this->options->Show) && in_array('footer', $this->options->Show)): ?> 
		<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
		<?php if($pages->have()):?>
		<p>
		<?php while($pages->next()): ?>
		<a<?php if($this->is('page', $pages->slug)): ?> class="current"<?php endif; ?> href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a><em>·</em>
		<?php endwhile; ?>
		<a href="<?php $this->options->feedUrl(); ?>"><?php _e('文章 RSS'); ?></a><em>·</em>
        <a href="<?php $this->options->commentsFeedUrl(); ?>"><?php _e('评论 RSS'); ?></a>
		</p>
				
		<?php endif;?>
		<?php endif;?>
		<p>&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title(); ?></a>
			<?php if($this->options->icpNum):?> <em>·</em> <a href="http://www.miitbeian.gov.cn/" target="blank"><?php $this->options->icpNum();?></a><?php endif;?>
			<span><?php if($this->options->siteStat):?><?php $this->options->siteStat();?><?php endif;?></span>
		</p>
	</div>
</footer><!-- end #footer -->

<div class="fixed-btn">
	<a class="btn-gotop" href="javascript:jBlog.goTop();"> <i class="fa fa-angle-up"></i></a>
</div>
<script>
	$(function(){
		jBlog.init({
			url:'<?php $this->options->siteUrl();?>',
			action:'<?php $this->options->index('action');?>',
			current:'<?php echo $this->getArchiveType();?>',
			prefix:'<?php echo md5($this->options->rootUrl);?>',
		});
	});
</script>
<?php $this->footer(); ?>
<script>
	$(document).ready(function(){
		$(document).pjax('a[href^="<?php Helper::options()->siteUrl()?>"]:not(a[target="_blank"], a[no-pjax])', {
				container: '#wrapper',
				fragment: '#wrapper',
				timeout: 5000
			}
		).on('pjax:send', function() {
			//加入loading动画
			NProgress.start();
			$('body').append("<div id='container' ><div id='loader-wrapper'><div id='loader'></div><div class='loader-section section-left'></div><div class='loader-section section-right'></div></div></div>");
		}).on('pjax:complete', function() {
			NProgress.done();
            jBlogInit();
			$('#container').remove(); //去掉loading动画
		});
		$(function () {
			$('.nav-menu a').bind('click',function () {
				$('.nav-menu a').removeClass('current');
				$(this).addClass('current')
			})
		})
	});
</script>
<script>
	(function(){
		var bp = document.createElement('script');
		var curProtocol = window.location.protocol.split(':')[0];
		if (curProtocol === 'https') {
			bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
		}
		else {
			bp.src = 'http://push.zhanzhang.baidu.com/push.js';
		}
		var s = document.getElementsByTagName("script")[0];
		s.parentNode.insertBefore(bp, s);
	})();
</script>
</body>
</html>
